import Cookie from 'js-cookie'
const TOKEN_KEY = 'geek-pc-90-token'
//设置存储token
export function setToken(token) {
    //存token
    Cookie.set(TOKEN_KEY, token)
}
//获取token
export function getToken() {
    return Cookie.get(TOKEN_KEY)
}

//删除token
export function removeToken() {
    return Cookie.remove(TOKEN_KEY)
}
//判断有没有token !!可以把任意类型的值转成布尔值

export function hasToken() {
    return !!getToken()
}